<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 300px;
            outline: 1px solid;
            text-align: justify;
            font-size: 0;
        }
        span{
            font-size: 20px;
            display: inline-block;
            width: 100px;
            line-height: 100px;
            border-bottom: 1px solid lightcyan;
            background: cyan;
        }
        i{
            display: inline-block;
            font-size: 20px;
            width: 100px;
            line-height: 100px;
        }
    </style>
</head>
<body>
    <div>
        <span>1</span>
        <span>2</span>
        <span>3</span>
        <span>4</span>
        <span>5</span>
        <i>6</i>
        <i>7</i>
        <i>8</i>
    </div>
</body>
</html> 
   